package com.ruoyi.peoplegroup.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.peoplegroup.mapper.ResearcherprojectsMapper;
import com.ruoyi.peoplegroup.domain.Researcherprojects;
import com.ruoyi.peoplegroup.service.IResearcherprojectsService;

/**
 * 科研人员关联项目Service业务层处理
 * 
 * @author gw
 * @date 2025-01-08
 */
@Service
public class ResearcherprojectsServiceImpl implements IResearcherprojectsService 
{
    @Autowired
    private ResearcherprojectsMapper researcherprojectsMapper;

    /**
     * 查询科研人员关联项目
     * 
     * @param researcherProjectId 科研人员关联项目主键
     * @return 科研人员关联项目
     */
    @Override
    public Researcherprojects selectResearcherprojectsByResearcherProjectId(Long researcherProjectId)
    {
        return researcherprojectsMapper.selectResearcherprojectsByResearcherProjectId(researcherProjectId);
    }

    /**
     * 查询科研人员关联项目列表
     * 
     * @param researcherprojects 科研人员关联项目
     * @return 科研人员关联项目
     */
    @Override
    public List<Researcherprojects> selectResearcherprojectsList(Researcherprojects researcherprojects)
    {
        return researcherprojectsMapper.selectResearcherprojectsList(researcherprojects);
    }

    /**
     * 新增科研人员关联项目
     * 
     * @param researcherprojects 科研人员关联项目
     * @return 结果
     */
    @Override
    public int insertResearcherprojects(Researcherprojects researcherprojects)
    {
        return researcherprojectsMapper.insertResearcherprojects(researcherprojects);
    }

    /**
     * 修改科研人员关联项目
     * 
     * @param researcherprojects 科研人员关联项目
     * @return 结果
     */
    @Override
    public int updateResearcherprojects(Researcherprojects researcherprojects)
    {
        return researcherprojectsMapper.updateResearcherprojects(researcherprojects);
    }

    /**
     * 批量删除科研人员关联项目
     * 
     * @param researcherProjectIds 需要删除的科研人员关联项目主键
     * @return 结果
     */
    @Override
    public int deleteResearcherprojectsByResearcherProjectIds(Long[] researcherProjectIds)
    {
        return researcherprojectsMapper.deleteResearcherprojectsByResearcherProjectIds(researcherProjectIds);
    }

    /**
     * 删除科研人员关联项目信息
     * 
     * @param researcherProjectId 科研人员关联项目主键
     * @return 结果
     */
    @Override
    public int deleteResearcherprojectsByResearcherProjectId(Long researcherProjectId)
    {
        return researcherprojectsMapper.deleteResearcherprojectsByResearcherProjectId(researcherProjectId);
    }
}
